﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;

namespace Asomy.View
{
    class Camera
    {
        float m_xscale = 1;
        float m_yscale = 1;

        float m_zoom = 1.0f;
        float m_zoomValue = 0.25f;

        public float X_scale
        {
            get { return m_xscale * Zoom; }
        }

        public float Y_scale
        {
            get { return m_yscale * Zoom; } 
        }

        public float Zoom
        {
            get { return m_zoom; }
            set
            {
                m_zoom = value;
                if (m_zoom > 4.0f)
                {
                    m_zoom = 4.0f;
                }
                else if (m_zoom < 0.25f)
                {
                    m_zoom = 0.25f;
                }
            }
        }

        public void ZoomIn()
        {
            Zoom += m_zoomValue;
        }

        public void ZoomOut()
        {
            Zoom -= m_zoomValue;            
        }
    }
}
